package icu.stag.common.exception;

import lombok.Getter;

/**
 * 全局的异常处理类
 *
 * @author wangpingping
 */
@Getter
public class ServerException extends RuntimeException {
    
    private Integer code;
    private String msg;
    
    public ServerException(String message) {
        super(message);
        this.code = 500;
        this.msg = message;
    }
    
    public ServerException(String message, Integer code) {
        super(message);
        this.code = code;
        this.msg = message;
    }
    
    public ServerException(String message, Throwable cause) {
        super(message, cause);
        this.code = 500;
        this.msg = message;
    }

}